import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hook_up_rent/store/store.dart';
// import 'package:hook_up_rent/routes/index.dart';
import 'package:hook_up_rent/widgets/search_bar/search_bar.dart';

AppBar buildHomeBar(BuildContext context) {
  // final SelectedIndexController selectedIndexController = Get.put(SelectedIndexController());
  final SelectedIndexController selectedIndexController = Get.find();
  return AppBar(
    title: SearchBar(
      showLocation: true,
      showMap: true,
      onSearch: () {
        selectedIndexController.changeSelectIndex(1);
      },
    ),
    centerTitle: true,
    backgroundColor: Colors.white,
  );
}
